/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.business.product.core.repository.entity;

import com.gitee.peigenlpy.actable.annotation.Column;
import com.gitee.peigenlpy.actable.annotation.Index;
import com.gitee.peigenlpy.actable.annotation.Table;
import com.gitee.peigenlpy.actable.constants.MySqlCharsetConstant;
import com.gitee.peigenlpy.actable.constants.MySqlEngineConstant;
import com.gitee.peigenlpy.actable.constants.MySqlTypeConstant;
import info.peigen.hotpot.business.product.facade.enums.ProductSpecDisplayPosition;
import info.peigen.hotpot.component.data.repository.beetlsql.entity.AbstractCreateTimeEntity;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;

/**
 * <b>(ProductSpecificationEntity)</b>
 * 商品规格
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2021/11/3
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true)
@Table(name = "product_specification", comment = "商品规格", charset = MySqlCharsetConstant.UTF8MB4, engine = MySqlEngineConstant.InnoDB)
@org.beetl.sql.annotation.entity.Table(name = "product_specification")
public class ProductSpecificationEntity extends AbstractCreateTimeEntity {
    @Column(name = "group_name", type = MySqlTypeConstant.VARCHAR, length = 30, isNull = false, comment = "规格组名")
    @org.beetl.sql.annotation.entity.Column("group_name")
    @Index(value = "groupName", columns = "group_name")
    String                     groupName;
    @Column(name = "name", type = MySqlTypeConstant.VARCHAR, length = 100, isNull = false, comment = "规格名")
    @org.beetl.sql.annotation.entity.Column("name")
    String                     name;
    @Column(name = "value", type = MySqlTypeConstant.VARCHAR, length = 30, isNull = false, comment = "选项值")
    @org.beetl.sql.annotation.entity.Column("value")
    String                     value;
    @Column(name = "position", type = MySqlTypeConstant.VARCHAR, length = 30, comment = "显示位置")
    @org.beetl.sql.annotation.entity.Column("position")
    ProductSpecDisplayPosition position;
    @Column(name = "operator_id", type = MySqlTypeConstant.VARCHAR, length = 30, comment = "操作员Id")
    @org.beetl.sql.annotation.entity.Column("operator_id")
    String                     operatorId;
}